package net.joint_painting.shared.model;

import java.io.Serializable;
import java.util.Date;

/**
 * @author CAM
 * @version $Revision: 1.0 $
 */
public class Line implements Serializable {

    /**
	 * 
	 */
    private static final long serialVersionUID = 337647284113282116L;
    private Date date;

    private String surfaceId;
    private Integer x1;
    private Integer x2;
    private Integer y1;
    private Integer y2;
    private Integer size;
    private Color color;

    public Line() {
    }

    /**
     * Constructor for Line.
     * 
     * @param id
     *            String
     * @param x1
     *            Integer
     * @param y1
     *            Integer
     * @param x2
     *            Integer
     * @param y2
     *            Integer
     * @param size
     *            Integer
     * @param color
     *            gwt.g2d.client.graphics.Color
     */
    public Line(String id, Integer x1, Integer y1, Integer x2, Integer y2,
	    Integer size, gwt.g2d.client.graphics.Color color) {
	date = new Date();
	this.surfaceId = id;
	this.x1 = x1;
	this.y1 = y1;
	this.x2 = x2;
	this.y2 = y2;
	this.size = size;
	this.color = new Color(color);
    }

    /**
     * 
     * @return the color
     */
    public gwt.g2d.client.graphics.Color getColor() {
	return color.getColor();
    }

    /**
     * 
     * @return the size
     */
    public Integer getSize() {
	return size;
    }

    /**
     * Method getSurfaceId.
     * 
     * @return String
     */
    public String getSurfaceId() {
	return surfaceId;
    }

    /**
     * 
     * @return the x1
     */
    public Integer getX1() {
	return x1;
    }

    /**
     * 
     * @return the x2
     */
    public Integer getX2() {
	return x2;
    }

    /**
     * 
     * @return the y1
     */
    public Integer getY1() {
	return y1;
    }

    /**
     * 
     * @return the y2
     */
    public Integer getY2() {
	return y2;
    }

    /**
     * Method setSurfaceId.
     * 
     * @param id
     *            String
     */
    public void setSurfaceId(String id) {
	this.surfaceId = id;
    }
}